<template>
	  <view class="container">
		  

		<view class="modal">
			<view>
				<uv-toast ref="toast"></uv-toast>
			</view>
			    <view class="modal-content">
				      <view class="modal-header">
					    
					        <i class="fa fa-times" @click="closeModal"></i>
					      </view>
				      <view class="modal-body" style="width:800px;height: 300px;">
					     <view style="line-height: 200px;font-size: 18px;text-align: center;">
						The system has expired, Please contact the manufacturer.

					</view>

					   </view>

<!-- 
				      <view class="modal-footer">
					        <button type="button" class="but1" @click="closeModal">{{this.lanuage.return}}</button>
					      </view> -->
				    </view>
			  
		</view>





		  
	</view>
</template>

<script>
	export default {

		data() {
			return {

				warnmsg: '',

				lanuage: {
					open: '',
					close: '',
					save: '',
					Runing: '',
					IsDoing: '',
					OperationSuccessful: '',
					OperationFaild: '',
					watertemp: '',
					configuration: '',
					return: ''
				}
			}
		},
		onReady() {

			// #ifdef APP-PLUS
			console.log('APP端');
			//this.showApp = true; //该代码仅在app中生效
			// #endif

			this._freshing = false;
			this.timer = setInterval(() => {
				/* 列表 */
				//	this.getProductWarn();
			}, 5000);
			this.timer1 = setInterval(() => {

			}, 10000);
		},
		methods: {
			closeModal() {
				// uni.navigateTo({
				// 	url: "setParameter"
				// })
				uni.navigateBack();
			},
			async getPruductLanguage() {
				var languagecode = uni.getStorageSync('languagecode');
				const ret = await this.$myRequest({
					url: "/api/common/Language/getPruductLanguageAlone?pguid=" + uni.getStorageSync(
						'productGuid') + "&languagecode=" + languagecode,
					data: {
						//pguid: uni.getStorageSync('productGuid'),
					}
				})
				if (ret.respCode == "200") {


					var cCode = 0;
					var content = "";
					ret.data.some((item, i) => {
						cCode = item.code;
						content = item.content;
						if (cCode == 1000) {
							this.lanuage.open = content;
						} else if (cCode == 1001) {
							this.lanuage.close = content;
						} else if (cCode == 1005) {
							this.lanuage.save = content;
						} else if (cCode == 1025) {
							this.lanuage.light = content;
						} else if (cCode == 1026) {
							this.lanuage.co2 = content;
						} else if (cCode == 1035) {
							this.lanuage.OperationSuccessful = content;
						} else if (cCode == 1034) {
							this.lanuage.OperationFaild = content;
						} else if (cCode == 1036) {
							this.lanuage.IsDoing = content;
						} else if (cCode == 1031) {
							this.lanuage.Humidity = content;
						} else if (cCode == 1043) {
							this.lanuage.watertemp = content;
						} else if (cCode == 1038) {
							this.lanuage.LightIntensity = content;
						} else if (cCode == 1030) {
							this.lanuage.Temperature = content;
						} else if (cCode == 1050) {
							this.lanuage.upperlimit = content;
						} else if (cCode == 1051) {
							this.lanuage.lowerlimit = content;
						} else if (cCode == 1053) {
							this.lanuage.configuration = content;
						} else if (cCode == 1054) {
							this.lanuage.return = content;
						}


					});

					//	console.log('sucess' + JSON.stringify(ret.data));

				} else {
					uni.showToast({
						title: this.lanuage.OperationFaild,
						//将值设置为 success 或者直接不用写icon这个参数
						icon: 'none',
						//显示持续时间为 2秒
						duration: 2000
					})
					console.log('fail' + JSON.stringify(ret.data));
				}

			}


		},
		onUnload() {

			//if (this.timer) {
			clearInterval(this.timer)
			this.timer = null

			clearInterval(this.timer1)
			this.timer1 = null
			//}
		},
		onHide() {
			//if (this.timer) {
			clearInterval(this.timer)
			this.timer = null

			clearInterval(this.timer1)
			this.timer1 = null
			//}
		},
		onLoad(options) {
			this.getPruductLanguage();
		}
	}
</script>
<style lang="scss">
	.container {
		position: absolute;
		width: 100%;
		height: 100%;
		//background-color:darkblue;
		//background-color: #f3f1f1;
		//background-color: #28c32b;
		background-image: url("../../static/imageV7/bg3.jpeg");
		background-size: 100% 100%;
		font-family: '微软雅黑';

	}

	.modal .txtinput {
		width: 80px;
		height: 35px;
		background-color: #b0e2a3;
		text-align: center;
	}

	.modal {
		position: fixed;
		left: 0;
		top: 0;
		z-index: 99999;
		width: 100%;
		height: 100%;
		background-color: rgba(0, 0, 0, 0.5);
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.modal .modal-content {

		background-color: #ffffff;
		border-radius: 10rpx;
		overflow: hidden;
	}

	.modal .modal-content .modal-header {
		background-color: green;
		color: #ffffff;
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 10rpx;
	}

	.modal .modal-content .modal-header h2 {
		margin: 0;
	}

	.modal .modal-content .modal-header i {
		font-size: 20rpx;
		cursor: pointer;
	}

	.modal .modal-content .modal-body {
		padding: 20rpx;
	}

	.modal .modal-content .modal-footer {
		background-color: #eeeeee;
		padding: 10rpx;

		display: flex;
		justify-content: flex-end;
	}

	.modal .modal-content .modal-footer button {
		border: none;
		margin-left: 10rpx;
		margin: 10px;
		width: 100px;
		border-radius: 5rpx;
		cursor: pointer;
	}

	.modal .modal-content .modal-footer .but1 {
		background-color: green;
		color: #ffffff;
	}

	.modal .modal-content .modal-footer .but2 {
		background-color: #dddddd;
		color: #333333;
	}
</style>